//
//  SchoolControllerViewController.m
//  Comma
//
//  Created by 杜远洋 on 15-1-20.
//  Copyright (c) 2015年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "SchoolControllerViewController.h"
#import "SchoolView.h"
#import "YRSideViewController.h"
#import "LoadIndicator.h"
@interface SchoolControllerViewController ()

@end

@implementation SchoolControllerViewController
- (void)loadView
{
    [super loadView];
    self.school = [[SchoolView alloc] initWithLeftButton:@"返回" RightButton:@"确定" Title:@"学校" FooterView:FooterViewStateNone];
    self.view = self.school;
    // 不能划出侧边栏
    YRSideViewController *slide = [YRSideViewController share];
    slide.needSwipeShowMenu = NO;
    
}
- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self.view setBackgroundColor:[UIColor whiteColor]];
        [self.school createMySchoolName];
    
    [self.school.rightButton addTarget:self action:@selector(rightButtonAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.school.leftButton addTarget:self action:@selector(leftButtonAction:) forControlEvents:UIControlEventTouchUpInside];
}

- (void)rightButtonAction:(id)sender
{
    [self.delegate transferData:self.school.mySchoolName.text];
    [self dismissViewControllerAnimated:YES completion:nil];
}
- (void)leftButtonAction:(id)sender
{
    [self dismissViewControllerAnimated:YES completion:nil];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
